//: DateFormatter.java 10.09.2008 16:14:53Z apt $
package com.devunion.salon.util;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateUtils;

import java.sql.Date;
import java.text.ParseException;

/**
 * @author Timoshenko Alexander
 */
public class DateFormatter {
    private static final String pattern = "yyyy-MM-dd";

    public static Date getSQLDate(String date) throws ParseException {
        if (StringUtils.isBlank(date)) {
            return new Date(System.currentTimeMillis());
        }
        return new Date(Long.valueOf(date));
    }
}
